Skip to content

Events tab: card navigator, floating button, group invite flow#2191

Open
akaevmikail17 wants to merge 3 commits into
TelegramMessenger:masterfrom
akaevmikail17:feature/events-tab
Open

Events tab: card navigator, floating button, group invite flow#2191
akaevmikail17 wants to merge 3 commits into
TelegramMessenger:masterfrom
akaevmikail17:feature/events-tab

Conversation

@akaevmikail17

Copy link
Copy Markdown
  • Add Events tab to root tab bar (EventsController)
  • CreateEventController: create/edit events with participants
  • Attachment menu: new "Событие" button in any chat
    • DM: pre-fills recipient as participant
    • Group: opens blank form; on save sends card message + stores with chatId
  • sendEventToGroup: single formatted message (removed poll)
  • EventCardNavigatorController: per-group card UI with Yes/No voting
    • Yes → adds event to personal calendar
    • Navigates newest-first through group events
  • ChatControllerEventButton: floating draggable 📅 button in group chats
    • Semi-transparent, snaps to screen edge
    • Badge shows count of unvoted events
  • TGEvent: added chatId field for group association

- Add Events tab to root tab bar (EventsController)
- CreateEventController: create/edit events with participants
- Attachment menu: new "Событие" button in any chat
  - DM: pre-fills recipient as participant
  - Group: opens blank form; on save sends card message + stores with chatId
- sendEventToGroup: single formatted message (removed poll)
- EventCardNavigatorController: per-group card UI with Yes/No voting
  - Yes → adds event to personal calendar
  - Navigates newest-first through group events
- ChatControllerEventButton: floating draggable 📅 button in group chats
  - Semi-transparent, snaps to screen edge
  - Badge shows count of unvoted events
- TGEvent: added chatId field for group association

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@akaevmikail17

Copy link
Copy Markdown
Author

ok

@akaevmikail17 akaevmikail17 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

akaevmikail17 and others added 2 commits June 7, 2026 14:46
- Extract TGEventStorage enum for shared UserDefaults keys (single source of truth)
- Move DateFormatter instances to static let (avoid recreating on every call)
- Fix floating button safe area: use view's own insets instead of window cast
- Fix weak self capture in DispatchQueue closure (memory leak)
- Add PeerId.localStorageId extension as single canonical conversion
- Add autoresizingMask to floating button for correct rotation behavior
- Fix card navigator: preserve scroll position on reload, fix animation order
- Personal calendar copy gets fresh UUID; duplicate detection by title+date
- Fix participant deletion: reload section to reset button tags after index shift
- Update .gitignore: ignore tg-events/ and sync script

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… size

- TGEventAttribute: new MessageAttribute in TelegramCore/SyncCore storing
  event data invisibly (eventId, title, timestamps, location); registered
  via declareEncodable in AccountManager; replaces visible [TGE:...] JSON text

- EventCardNavigatorController: full rewrite with UIScrollView layout;
  participant sections "Идут / Не идут" with names and vote dates;
  TGVoteEntry (v2 vote storage) alongside v1 for badge compat;
  scanMessageHistory() uses TGEventAttribute with legacy text fallback;
  loadCurrentUser() reads voter name from Postbox

- EventsController: TGEvent.chatIsGroup field (nil=personal, true=group,
  false=DM); EventCell shows subtle person.2/person source icon top-right;
  tab icon scaled to 68% via Lottie JSON and PDF asset

- ChatControllerOpenAttachmentMenu: clean message text (no [TGE:...]),
  attaches TGEventAttribute; stores chatIsGroup: true in persisted event

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants